<template>
	<view class="content">
		<view class="address" v-if="a==0">
			<good></good>
		</view>
		<view class="address" v-if="a==1">
			<goodintroduce></goodintroduce>
		</view>
		<view class="tabber">
			<template>
				<view class="tabber1">

					<view class="tab1" v-for="(item,index) in tabber" :key="index" @click="tab(item.id)">
						<image style="width: 48rpx; height: 48rpx;" :src="item.iconPath" mode=""></image>
						<text>{{item.text}}</text>
					</view>

				</view>
			</template>
		</view>
	</view>
</template>

<script>
	import good from './shop.vue'
	import goodintroduce from './shop_introduce.vue'
	export default {

		components: {
			good,
			goodintroduce,
		},
		data() {
			return {
				a: 0,
				tabber: [{
						id: 0,
						iconPath: '../../../../static/my/sm1.png',
						selectedIconPath: '',
						text: 'a'
					},
					{
						id: 1,
						iconPath: '../../../../static/my/js.png',
						selectedIconPath: '../../../../static/my/sm1.png',
						text: '正在售卖'
					}
				]
			}
		},
		methods: {
			tab(id) {
				this.a = id
				console.log(this.a)
			}
		}
	}
</script>

<style>
	.content {
		width: 750rpx;
		background: #F2F2F2;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.tabber1 {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: auto;
	}

	.tabber {
		width: 750rpx;
		height: 166rpx;
		background: #ffffff;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: fixed;
		bottom: 0;
		display: flex;
		justify-content: center;
	}

	.tab1 {
		width: 50%;
		display: flex;
		flex-direction: column;
		margin: auto;
		justify-content: center;

	}

	.tab1 image {
		margin: auto;
	}

	.tab1 text {
		margin: 4rpx auto 0;

		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 20rpx;
		color: #6E7480;
		line-height: 23rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}
</style>